/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.xub.service.controller;

import com.xub.service.HiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author -adm-xubin
 */
@RestController
public class HiController {

    @Autowired
    private HiService hiService;
    
    @GetMapping("/hi")
    public String sayHi(@RequestParam(required = false, defaultValue = "xubin") String name) {
        return hiService.sayHi(name);
    }
    
}
